/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

数据计算服务API
数据计算服务相关API

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#ifndef XdataClient_h
#define XdataClient_h


#import <JDCloudOCSDKCore/JDCloudOCSDKCore.h>
#import <JDCloudOCSDKXdata/XdataApiModel.h>

@interface XdataClient : NSObject<JDCloudClient>{
    @private
    NSString* _userAgent;
    NSString* _serviceName;
    NSString* _version;
    }

    @property (strong,readonly,nonatomic) NSString* userAgent;

    @property (strong,readonly,nonatomic) NSString* serviceName;

    @property (strong,readonly,nonatomic) NSString* version;

    @property (strong,nonatomic) NSString* contentType;

    @property (strong,nonatomic) Credential* credential;

    @property (strong,nonatomic) SDKEnvironment* sdkEnvironment;

    @property (strong,nonatomic) NSMutableDictionary* customHeader;

    @property  (strong,nonatomic) NSString* httpRequestProtocol;

    -(void) addCustomerHeaderWithKey:(NSString*) key
    value:(NSString*) value;

    -(id)initWithGlobalConfig;

    -(id)initWithCredential:(Credential*)credential
    sdkEnvironment:(SDKEnvironment*)sdkEnvironment;
    -(id)initWithCredential:(Credential*)credential;
    /**
    cancelRasQuery sync request
    @param cancelRasQueryRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `cancelRasQueryResponse` the request response data model
    */
    -(NSDictionary*) cancelRasQuerySyncWithRequest:(XdataCancelRasQueryRequest*) cancelRasQueryRequest;

    -(void)cancelRasQueryAsyncWithRequest:(XdataCancelRasQueryRequest*) cancelRasQueryRequest
    completionHandler:(void(^)(int statusCode,XdataCancelRasQueryResponse* _Nullable cancelRasQueryResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    createDatabase sync request
    @param createDatabaseRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createDatabaseResponse` the request response data model
    */
    -(NSDictionary*) createDatabaseSyncWithRequest:(XdataCreateDatabaseRequest*) createDatabaseRequest;

    -(void)createDatabaseAsyncWithRequest:(XdataCreateDatabaseRequest*) createDatabaseRequest
    completionHandler:(void(^)(int statusCode,XdataCreateDatabaseResponse* _Nullable createDatabaseResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    getPySparkExecuteState sync request
    @param getPySparkExecuteStateRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getPySparkExecuteStateResponse` the request response data model
    */
    -(NSDictionary*) getPySparkExecuteStateSyncWithRequest:(XdataGetPySparkExecuteStateRequest*) getPySparkExecuteStateRequest;

    -(void)getPySparkExecuteStateAsyncWithRequest:(XdataGetPySparkExecuteStateRequest*) getPySparkExecuteStateRequest
    completionHandler:(void(^)(int statusCode,XdataGetPySparkExecuteStateResponse* _Nullable getPySparkExecuteStateResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    listDatabaseInfo sync request
    @param listDatabaseInfoRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `listDatabaseInfoResponse` the request response data model
    */
    -(NSDictionary*) listDatabaseInfoSyncWithRequest:(XdataListDatabaseInfoRequest*) listDatabaseInfoRequest;

    -(void)listDatabaseInfoAsyncWithRequest:(XdataListDatabaseInfoRequest*) listDatabaseInfoRequest
    completionHandler:(void(^)(int statusCode,XdataListDatabaseInfoResponse* _Nullable listDatabaseInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    getDatabaseInfo sync request
    @param getDatabaseInfoRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getDatabaseInfoResponse` the request response data model
    */
    -(NSDictionary*) getDatabaseInfoSyncWithRequest:(XdataGetDatabaseInfoRequest*) getDatabaseInfoRequest;

    -(void)getDatabaseInfoAsyncWithRequest:(XdataGetDatabaseInfoRequest*) getDatabaseInfoRequest
    completionHandler:(void(^)(int statusCode,XdataGetDatabaseInfoResponse* _Nullable getDatabaseInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    listTableInfo sync request
    @param listTableInfoRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `listTableInfoResponse` the request response data model
    */
    -(NSDictionary*) listTableInfoSyncWithRequest:(XdataListTableInfoRequest*) listTableInfoRequest;

    -(void)listTableInfoAsyncWithRequest:(XdataListTableInfoRequest*) listTableInfoRequest
    completionHandler:(void(^)(int statusCode,XdataListTableInfoResponse* _Nullable listTableInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    getRasQueryState sync request
    @param getRasQueryStateRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getRasQueryStateResponse` the request response data model
    */
    -(NSDictionary*) getRasQueryStateSyncWithRequest:(XdataGetRasQueryStateRequest*) getRasQueryStateRequest;

    -(void)getRasQueryStateAsyncWithRequest:(XdataGetRasQueryStateRequest*) getRasQueryStateRequest
    completionHandler:(void(^)(int statusCode,XdataGetRasQueryStateResponse* _Nullable getRasQueryStateResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    executeRasQuery sync request
    @param executeRasQueryRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `executeRasQueryResponse` the request response data model
    */
    -(NSDictionary*) executeRasQuerySyncWithRequest:(XdataExecuteRasQueryRequest*) executeRasQueryRequest;

    -(void)executeRasQueryAsyncWithRequest:(XdataExecuteRasQueryRequest*) executeRasQueryRequest
    completionHandler:(void(^)(int statusCode,XdataExecuteRasQueryResponse* _Nullable executeRasQueryResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    cancelPySparkJob sync request
    @param cancelPySparkJobRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `cancelPySparkJobResponse` the request response data model
    */
    -(NSDictionary*) cancelPySparkJobSyncWithRequest:(XdataCancelPySparkJobRequest*) cancelPySparkJobRequest;

    -(void)cancelPySparkJobAsyncWithRequest:(XdataCancelPySparkJobRequest*) cancelPySparkJobRequest
    completionHandler:(void(^)(int statusCode,XdataCancelPySparkJobResponse* _Nullable cancelPySparkJobResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    getPySparkExecuteResult sync request
    @param getPySparkExecuteResultRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getPySparkExecuteResultResponse` the request response data model
    */
    -(NSDictionary*) getPySparkExecuteResultSyncWithRequest:(XdataGetPySparkExecuteResultRequest*) getPySparkExecuteResultRequest;

    -(void)getPySparkExecuteResultAsyncWithRequest:(XdataGetPySparkExecuteResultRequest*) getPySparkExecuteResultRequest
    completionHandler:(void(^)(int statusCode,XdataGetPySparkExecuteResultResponse* _Nullable getPySparkExecuteResultResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    listInstanceInfo sync request
    @param listInstanceInfoRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `listInstanceInfoResponse` the request response data model
    */
    -(NSDictionary*) listInstanceInfoSyncWithRequest:(XdataListInstanceInfoRequest*) listInstanceInfoRequest;

    -(void)listInstanceInfoAsyncWithRequest:(XdataListInstanceInfoRequest*) listInstanceInfoRequest
    completionHandler:(void(^)(int statusCode,XdataListInstanceInfoResponse* _Nullable listInstanceInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    deleteDatabase sync request
    @param deleteDatabaseRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteDatabaseResponse` the request response data model
    */
    -(NSDictionary*) deleteDatabaseSyncWithRequest:(XdataDeleteDatabaseRequest*) deleteDatabaseRequest;

    -(void)deleteDatabaseAsyncWithRequest:(XdataDeleteDatabaseRequest*) deleteDatabaseRequest
    completionHandler:(void(^)(int statusCode,XdataDeleteDatabaseResponse* _Nullable deleteDatabaseResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    getTableInfo sync request
    @param getTableInfoRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getTableInfoResponse` the request response data model
    */
    -(NSDictionary*) getTableInfoSyncWithRequest:(XdataGetTableInfoRequest*) getTableInfoRequest;

    -(void)getTableInfoAsyncWithRequest:(XdataGetTableInfoRequest*) getTableInfoRequest
    completionHandler:(void(^)(int statusCode,XdataGetTableInfoResponse* _Nullable getTableInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    executePySparkQuery sync request
    @param executePySparkQueryRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `executePySparkQueryResponse` the request response data model
    */
    -(NSDictionary*) executePySparkQuerySyncWithRequest:(XdataExecutePySparkQueryRequest*) executePySparkQueryRequest;

    -(void)executePySparkQueryAsyncWithRequest:(XdataExecutePySparkQueryRequest*) executePySparkQueryRequest
    completionHandler:(void(^)(int statusCode,XdataExecutePySparkQueryResponse* _Nullable executePySparkQueryResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    getRasQueryResult sync request
    @param getRasQueryResultRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getRasQueryResultResponse` the request response data model
    */
    -(NSDictionary*) getRasQueryResultSyncWithRequest:(XdataGetRasQueryResultRequest*) getRasQueryResultRequest;

    -(void)getRasQueryResultAsyncWithRequest:(XdataGetRasQueryResultRequest*) getRasQueryResultRequest
    completionHandler:(void(^)(int statusCode,XdataGetRasQueryResultResponse* _Nullable getRasQueryResultResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    createTable sync request
    @param createTableRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createTableResponse` the request response data model
    */
    -(NSDictionary*) createTableSyncWithRequest:(XdataCreateTableRequest*) createTableRequest;

    -(void)createTableAsyncWithRequest:(XdataCreateTableRequest*) createTableRequest
    completionHandler:(void(^)(int statusCode,XdataCreateTableResponse* _Nullable createTableResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    getRasQueryLog sync request
    @param getRasQueryLogRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getRasQueryLogResponse` the request response data model
    */
    -(NSDictionary*) getRasQueryLogSyncWithRequest:(XdataGetRasQueryLogRequest*) getRasQueryLogRequest;

    -(void)getRasQueryLogAsyncWithRequest:(XdataGetRasQueryLogRequest*) getRasQueryLogRequest
    completionHandler:(void(^)(int statusCode,XdataGetRasQueryLogResponse* _Nullable getRasQueryLogResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    deleteTable sync request
    @param deleteTableRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteTableResponse` the request response data model
    */
    -(NSDictionary*) deleteTableSyncWithRequest:(XdataDeleteTableRequest*) deleteTableRequest;

    -(void)deleteTableAsyncWithRequest:(XdataDeleteTableRequest*) deleteTableRequest
    completionHandler:(void(^)(int statusCode,XdataDeleteTableResponse* _Nullable deleteTableResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;

    /**
    xdata common sync request
    @param  jdcloudDataRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
    */
    -(NSDictionary*) xdataCommonSyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                           url:(NSString*) url
                                        method:(NSString*) method;

    -(void)xdataCommonAsyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                  url:(NSString*) url
                               method:(NSString*) method
                    completionHandler:(void(^)(int statusCode, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;

    @end


    #endif /* XdataClient_h */
